#pragma once

#include "./port.hh"
#include "./net.hh"

#include <string>
#include <string_view>
#include <vector>
#include <span>

namespace ycspice::preprocess {
    
    class Circuit {
    public:
        Circuit(std::string name);
        virtual ~Circuit() noexcept {}

    public:
        virtual auto expand_spice(std::string_view inst_name, std::span<std::string> nets) const -> std::string = 0; 
    
    public:
        auto add_port(std::string port_name) -> void;
        auto add_ports(std::span<std::string> port_names) -> void;

    public:
        auto check_net_size(std::span<std::string> nets) const -> void;

    protected:
        std::string _name;
        std::vector<Port> _ports;
    };

}